home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / glibc-1.09 / glibc-1 / glibc-1.09.1 / configure < prev    next >
Encoding:
Text File  |  1994-10-27  |  22.1 KB  |  796 lines

  1. #! /bin/sh
  2.  
  3. # Configuration script for the GNU C Library.
  4. # DO NOT EDIT!  This script is generated from configure.in; edit that instead.
  5.  
  6. # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
  7. # This file is part of the GNU C Library.
  8.  
  9. # The GNU C Library is free software; you can redistribute it and/or
  10. # modify it under the terms of the GNU Library General Public License as
  11. # published by the Free Software Foundation; either version 2 of the
  12. # License, or (at your option) any later version.
  13.  
  14. # The GNU C Library is distributed in the hope that it will be useful,
  15. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  17. # Library General Public License for more details.
  18.  
  19. # You should have received a copy of the GNU Library General Public
  20. # License along with the GNU C Library; see the file COPYING.LIB.  If
  21. # not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  22. # Cambridge, MA 02139, USA.
  23.  
  24. #
  25. #    Configure the GNU C Library.
  26. #
  27.  
  28. prog="`basename $0`"
  29.  
  30. # All the standard GNU configure options are accepted but only
  31. # --nfp, --with-gnu-ld, and --with-gnu-as are meaningful.
  32. nfp=
  33. gnu_ld=
  34. gnu_as=
  35. prefix=
  36. exec_prefix=
  37. verbose=
  38.  
  39. next=
  40. lose=
  41. for arg in $*; do
  42.   if [ x$next != x ]; then
  43.     eval "$next=\$arg"
  44.     next=
  45.   else
  46.     case $arg in
  47.     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
  48.        srcdir=`echo $arg | sed 's/-*s[a-z]*=//'`
  49.        ;;
  50.     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
  51.        next=srcdir
  52.        ;;
  53.     -target | --target | --targe | --targ | --tar | --ta | --t)
  54.        next=target
  55.        ;;
  56.     -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  57.        target=`echo $arg | sed 's/-*t[a-z]*=//'`
  58.        ;; 
  59.  
  60.     -with-gnu-ld | --with-gnu-ld | --with-gnu-l)
  61.        gnu_ld=--with-gnu-ld
  62.        ;;
  63.  
  64.     -gas | --gas | --ga | --g | -with-gnu-as | --with-gnu-as | -with-gnu-a)
  65.        gnu_as=--with-gnu-as
  66.        ;;
  67.  
  68.     -nfp | --nfp | --nf | --n)
  69.        nfp=--nfp
  70.        ;;
  71.  
  72.     -with-* | --with-*)
  73.       # For `--with-foo=bar', do "with_foo='bar'".
  74.       # For `--with-fnord', do "with_fnord=yes".
  75.       # These variables may be examined by sysdep configure fragments.
  76.       eval `echo "$arg" | sed '{s/^-*//;s/-/_/g
  77. s/^\([^=]*\)=\(.*\)$/\1='\''\2'\''/;s/^\([^=]*\)$/\1=yes/;}'`
  78.       ;;
  79.  
  80.     -x | --x)
  81.       ;; # ignored
  82.  
  83.     # For backward compatibility, also recognize exact --exec_prefix.
  84.     -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*)
  85.        exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'`
  86.        ;;
  87.     -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
  88.        next=exec_prefix
  89.        ;;
  90.  
  91.     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  92.        prefix=`echo $arg | sed 's/[-a-z_]*=//'`
  93.        ;;
  94.     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  95.        next=prefix
  96.        ;;
  97.  
  98.     -v | -verbose | --verbose | --verbos | --verbo | --verb | --ver | --ve | --v)
  99.       # Autoconf-generated code below will test this.
  100.       verbose=yes
  101.       ;;
  102.  
  103.     -*)
  104.        echo "Invalid option \`$arg'" 1>&2
  105.        lose=yes
  106.        ;;
  107.     *)
  108.        if [ ! "$target" ]; then
  109.      target=$arg
  110.        else
  111.      lose=yes
  112.        fi
  113.        ;;
  114.     esac
  115.   fi
  116. done
  117.  
  118. # NEXT will be set iff we have seen an option that wants an arg, but no arg.
  119. if [ "$next" ]; then
  120.   echo "$0: the \`--${next}' option requires an argument" >&2
  121.   lose=yes
  122. fi
  123.  
  124.  
  125. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  126. trap 'rm -fr confdefs* $ac_clean_files' 0
  127.  
  128. # Save the original args if we used an alternate arg parser.
  129. ac_configure_temp="${configure_args-$*}"
  130. # Strip out --no-create and --norecursion so they don't pile up.
  131. configure_args=
  132. for ac_arg in $ac_configure_temp; do
  133.   case "$ac_arg" in
  134.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  135.   | --no-cr | --no-c) ;;
  136.   -norecursion | --norecursion | --norecursio | --norecursi \
  137.   | --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;;
  138.   *) configure_args="$configure_args $ac_arg" ;;
  139.   esac
  140. done
  141.  
  142. # NLS nuisances.
  143. # These must not be set unconditionally because not all systems understand
  144. # e.g. LANG=C (notably SCO).
  145. if test "${LC_ALL+set}" = 'set'; then LC_ALL=C; export LC_ALL; fi
  146. if test "${LANG+set}"   = 'set'; then LANG=C;   export LANG;   fi
  147.  
  148. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  149. rm -rf conftest* confdefs.h
  150. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  151. echo > confdefs.h
  152.  
  153. # A filename unique to this package, relative to the directory that
  154. # configure is in, which we can look for to find out if srcdir is correct.
  155. ac_unique_file=features.h
  156.  
  157. # Find the source files, if location was not specified.
  158. if test -z "$srcdir"; then
  159.   ac_srcdir_defaulted=yes
  160.   # Try the directory containing this script, then `..'.
  161.   ac_prog=$0
  162.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  163.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  164.   srcdir=$ac_confdir
  165.   if test ! -r $srcdir/$ac_unique_file; then
  166.     srcdir=..
  167.   fi
  168. fi
  169. if test ! -r $srcdir/$ac_unique_file; then
  170.   if test x$ac_srcdir_defaulted = xyes; then
  171.     echo "configure: can not find sources in ${ac_confdir} or .." >&2; exit 1
  172.   else
  173.     echo "configure: can not find sources in ${srcdir}" >&2; exit 1
  174.   fi
  175. fi
  176. ac_ext=c
  177. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  178. ac_cpp='${CPP}'
  179. ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'
  180.  
  181.  
  182. ac_ext=c
  183. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  184. ac_cpp='${CPP}'
  185. ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'
  186.  
  187.  
  188.  
  189. # Decanonicalize srcdir so we can tell when we are configuring in srcdir.
  190. if [ "`(cd ${srcdir}; pwd)`" = "`pwd`" ]; then
  191.   srcdir=.
  192. fi
  193.  
  194. if [ ! "$target" ]; then
  195.   target=`$srcdir/config.guess`
  196.   test -n "$target" && echo "No target given; guessing target is ${target}."
  197. fi
  198.  
  199. if [ "$lose" = yes -o ! "$target" ]; then
  200.   echo "\
  201. Usage: $prog [--srcdir=DIR] [--prefix=DIR] [--exec-prefix=DIR]
  202.          [--nfp] [--with-gnu-ld] [--with-gnu-as] TARGET" >&2
  203.   if [ -r config.status ]; then
  204.     cat config.status >&2
  205.   fi
  206.   exit 1
  207. fi
  208.  
  209. # Done parsing the arguments.
  210.  
  211. # This will get text that should go into config.make.
  212. config_vars=
  213.  
  214. # Check for a --with-gmp argument and set gmp-srcdir in config.make.
  215. case "$with_gmp" in
  216. yes) echo "$prog: --with-gmp requires an argument; use --with-gmp=DIRECTORY"
  217.      exit 1 ;;
  218. '') ;;
  219. *) config_vars="$config_vars
  220. gmp-srcdir = $with_gmp" ;;
  221. esac
  222.  
  223. # Canonicalize the configuration name.
  224. config=`$srcdir/config.sub $target`
  225. if [ ! "$config" ]; then
  226.   # config.sub has written an error message.
  227.   exit 1
  228. fi
  229.  
  230. sysdep_dir=$srcdir/sysdeps
  231.  
  232. # machine-vendor-os
  233. eval "`echo $config | \
  234.        sed 's/^\(.*\)-\(.*\)-\(.*\)$/\
  235. config_machine=\1 config_vendor=\2 config_os=\3/'`"
  236.  
  237. # We keep the original values in `$config_*' and never modify them, so we
  238. # can write them unchanged into config.make.  Everything else uses
  239. # $machine, $vendor, and $os, and changes them whenever convenient.
  240. machine=$config_machine
  241. vendor=$config_vendor
  242. os=$config_os
  243.  
  244. # Make sco3.2v4 become sco3.2.4 and sunos4.1.1_U1 become sunos4.1.1.U1.
  245. os="`echo $os | sed 's/\([0-9A-Z]\)[v_]\([0-9A-Z]\)/\1.\2/g'`"
  246.  
  247. # Expand the configuration machine name into a subdirectory by architecture
  248. # type and particular chip.
  249. case "$machine" in
  250. i[345]86)
  251.   machine=i386/$machine ;;
  252. sparc[6789])
  253.   machine=sparc/$machine ;;
  254. m68k)
  255.   machine=m68k/m68020 ;;
  256. m680?0)
  257.   machine=m68k/$machine ;;
  258. m88k)
  259.   machine=m88k/m88100 ;;
  260. m88???)
  261.   machine=m88k/$machine ;;
  262. mips|r2000)
  263.   machine=mips/r3000 ;;
  264. r[34]000)
  265.   machine=mips/$machine ;;
  266. esac
  267.  
  268. case "$os" in
  269. gnu*)
  270.   base_os=mach/hurd ;;
  271. netbsd* | 386bsd*)
  272.   base_os=unix/bsd/bsd4.4 ;;
  273. osf1* | sunos* | ultrix* | newsos* | dynix* | *bsd*)
  274.   base_os=unix/bsd ;;
  275. linux* | sysv* | isc* | esix* | sco* | minix* | irix4*)
  276.   base_os=unix/sysv ;;
  277. solaris[2-9]*)
  278.   base_os=unix/sysv/sysv4 ;;
  279. none)
  280.   base_os=standalone ;;
  281. esac
  282.  
  283. case "$os:$base_os" in
  284. gnu* | linux* | bsd4.4* | *:bsd4.4)
  285.   gnu_ld=--with-gnu-ld
  286.   gnu_as=--with-gnu-as
  287. esac
  288.  
  289. # For sunos4.1.1, try sunos4.1.1, then sunos4.1, then sunos4, then sunos.
  290. tail=$os
  291. ostry=$os
  292. while o=`echo $tail | sed 's/\.[^.]*$//'`; [ $o != $tail ]; do
  293.   ostry="$ostry /$o"
  294.   tail=$o
  295. done  
  296. o=`echo $tail | sed 's/[0-9]*$//'`
  297. if [ $o != $tail ]; then
  298.   ostry="$ostry /$o"
  299. fi
  300.  
  301. # For unix/sysv/sysv4, try unix/sysv/sysv4, then unix/sysv, then unix.
  302. base=
  303. tail=$base_os
  304. while b=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; [ "$b" ]; do
  305.   set $b
  306.   base="$base /$1"
  307.   tail="$2"
  308. done
  309.  
  310. # For sparc/sparc9, try sparc/sparc9 and then sparc.
  311. mach=
  312. tail=$machine
  313. while m=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; [ "$m" ]; do
  314.   set $m
  315.   mach="$mach /$1"
  316.   tail="$2"
  317. done
  318.  
  319. # Find what sysdep directories exist.
  320. sysnames=
  321. for b in $base ''; do
  322.   for v in /$vendor ''; do
  323.     for o in /$ostry ''; do
  324.       for m in $mach ''; do
  325.         if [ -d $sysdep_dir$b$v$o$m ]; then
  326.           sysnames="$sysnames $b$v$o$m"
  327.       [ "$o" -o "$b" ] && os_used=t
  328.       [ "$m" ] && machine_used=t
  329.     fi
  330.       done
  331.     done
  332.   done
  333. done
  334.  
  335. if [ ! "$os_used" -a "$os" != none ]; then
  336.   echo Operating system $os is not supported. >&2
  337.   exit 1
  338. fi
  339. if [ ! "$machine_used" -a "$machine" != none ]; then
  340.   echo The $machine is not supported. >&2
  341.   exit 1
  342. fi
  343.  
  344. # We have now validated the configuration.
  345.  
  346. PWD=`pwd`
  347. echo Configuring the GNU C library in $PWD
  348. echo on `(hostname || uname -n) 2>/dev/null | sed 1q` for ${config}.
  349.  
  350. # Remove the leading slashes.
  351. sysnames="`echo $sysnames | sed -e 's@^/@@' -e 's@ /@ @g'`"
  352.  
  353. # Prepend the machine's FPU directory unless --nfp.
  354. if [ ! "$nfp" ]; then
  355.   fpu_dirs=
  356.   for m in $mach; do
  357.     if [ -d $sysdep_dir$m/fpu ]; then
  358.       fpu_dirs="$fpu_dirs $m/fpu"
  359.     fi
  360.   done
  361.   sysnames="`echo $fpu_dirs | sed -e 's,^/,,' -e 's, /,,g'` $sysnames"
  362. fi
  363.  
  364. # Expand the list of system names into a full list of directories
  365. # from each element's parent name and Implies file (if present).
  366. set $sysnames
  367. while [ $# -gt 0 ]; do
  368.   name=$1
  369.   shift
  370.  
  371.   if [ -f $sysdep_dir/$name/Implies ]; then
  372.     # Collect more names from the `Implies' file (removing comments).
  373.     implied="`sed 's/#.*$//' < $sysdep_dir/$name/Implies`"
  374.     for x in $implied; do
  375.       test -d $sysdep_dir/$x || echo "Warning: $name implies nonexistent $x">&2
  376.     done
  377.   else
  378.     implied=
  379.   fi
  380.  
  381.   # Add NAME to the list of names.
  382.   names="$names $name"
  383.  
  384.   # Find the parent of NAME, using the empty string if it has none.
  385.   parent="`echo $name | sed -n -e '/\//!q' -e 's=/[^/]*$==p'`"
  386.  
  387.   # Add the names implied by NAME, and NAME's parent (if it has one), to
  388.   # the list of names to be processed (the argument list).  We prepend the
  389.   # implied names to the list and append the parent.  We want implied
  390.   # directories to come before further directories inferred from the
  391.   # configuration components; this ensures that for sysv4, unix/common
  392.   # (implied by unix/sysv/sysv4) comes before unix/sysv (in ostry (here $*)
  393.   # after sysv4).
  394.   sysnames="`echo $implied $* $parent`"
  395.   if [ "$sysnames" != "" ]; then
  396.     set $sysnames
  397.   fi
  398. done
  399.  
  400. # Add the default directories.
  401. names="$names generic stub"
  402.  
  403. # Now uniquize the list.
  404. seen=
  405. sysnames=
  406. for name in $names; do
  407.   if echo "$seen" | fgrep -x $name >/dev/null; then
  408.     # Already in the list.
  409.     true;
  410.   else
  411.     # A new one.
  412.     if [ "$seen" = "" ]; then
  413.       seen="$name" sysnames="$name"
  414.     else
  415.       seen="$seen
  416. $name"
  417.       sysnames="$sysnames $name"
  418.     fi
  419.   fi
  420. done
  421.  
  422. echo Using system-dependent files from directories:
  423. for dir in $sysnames; do echo "    $dir"; done
  424.  
  425.  
  426. # Make sure to not get the incompatible SysV /etc/install and
  427. # /usr/sbin/install, which might be in PATH before a BSD-like install,
  428. # or the SunOS /usr/etc/install directory, or the AIX /bin/install,
  429. # or the AFS install, which mishandles nonexistent args, or
  430. # /usr/ucb/install on SVR4, which tries to use the nonexistent group
  431. # `staff', or /sbin/install on IRIX which has incompatible command-line
  432. # syntax.  Sigh.
  433. #
  434. #     On most BSDish systems install is in /usr/bin, not /usr/ucb
  435. #     anyway.
  436. # This turns out not to be true, so the mere pathname isn't an indication
  437. # of whether the program works.  What we really need is a set of tests for
  438. # the install program to see if it actually works in all the required ways.
  439. #
  440. # Avoid using ./install, which might have been erroneously created
  441. # by make from ./install.sh.
  442. if test -z "${INSTALL}"; then
  443.   test -n "$silent" || echo "checking for a BSD compatible install"
  444.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  445.   for ac_dir in $PATH; do
  446.     case "$ac_dir" in
  447.     ''|.|/etc|/sbin|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;;
  448.     *)
  449.       # OSF1 and SCO ODT 3.0 have their own names for install.
  450.       for ac_prog in installbsd scoinst install; do
  451.         if test -f $ac_dir/$ac_prog; then
  452.       if test $ac_prog = install &&
  453.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  454.         # AIX install.  It has an incompatible calling convention.
  455.         # OSF/1 installbsd also uses dspmsg, but is usable.
  456.         :
  457.       else
  458.         INSTALL="$ac_dir/$ac_prog -c"
  459.         break 2
  460.       fi
  461.     fi
  462.       done
  463.       ;;
  464.     esac
  465.   done
  466.   IFS="$ac_save_ifs"
  467. fi
  468.  
  469. if test -z "$INSTALL"; then
  470.   # As a last resort, use the slow shell script.
  471.   for ac_dir in ${srcdir} ${srcdir}/.. ${srcdir}/../..; do
  472.     if test -f $ac_dir/install.sh; then
  473.       INSTALL="$ac_dir/install.sh -c"; break
  474.     fi
  475.   done
  476. fi
  477. if test -z "$INSTALL"; then
  478.   echo "configure: can not find install.sh in ${srcdir} or ${srcdir}/.. or ${srcdir}/../.." >&2; exit 1
  479. fi
  480. test -n "$verbose" && echo "    setting INSTALL to $INSTALL"
  481.  
  482. # Use test -z because SunOS4 sh mishandles ${INSTALL_PROGRAM-'${INSTALL}'}.
  483. # It thinks the first close brace ends the variable substitution.
  484. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  485. test -n "$verbose" && echo "    setting INSTALL_PROGRAM to $INSTALL_PROGRAM"
  486.  
  487. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  488. test -n "$verbose" && echo "    setting INSTALL_DATA to $INSTALL_DATA"
  489.  
  490. if [ "$INSTALL" = "${srcdir}/install.sh" ]; then
  491.   # The makefiles need to use a different form to find it in $srcdir.
  492.   INSTALL='$(..)./install.sh'
  493. fi
  494. if test -z "$RANLIB"; then
  495.   # Extract the first word of `ranlib', so it can be a program name with args.
  496.   set ac_dummy ranlib; ac_word=$2
  497.   test -n "$silent" || echo "checking for $ac_word"
  498.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  499.   for ac_dir in $PATH; do
  500.     test -z "$ac_dir" && ac_dir=.
  501.     if test -f $ac_dir/$ac_word; then
  502.       RANLIB="ranlib"
  503.       break
  504.     fi
  505.   done
  506.   IFS="$ac_save_ifs"
  507. fi
  508. test -z "$RANLIB" && RANLIB=":"
  509. test -n "$RANLIB" && test -n "$verbose" && echo "    setting RANLIB to $RANLIB"
  510.  
  511.  
  512. if test -z "$CC"; then
  513.   # Extract the first word of `gcc', so it can be a program name with args.
  514.   set ac_dummy gcc; ac_word=$2
  515.   test -n "$silent" || echo "checking for $ac_word"
  516.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  517.   for ac_dir in $PATH; do
  518.     test -z "$ac_dir" && ac_dir=.
  519.     if test -f $ac_dir/$ac_word; then
  520.       CC="gcc"
  521.       break
  522.     fi
  523.   done
  524.   IFS="$ac_save_ifs"
  525. fi
  526. test -z "$CC" && CC="cc"
  527. test -n "$CC" && test -n "$verbose" && echo "    setting CC to $CC"
  528.  
  529. # Find out if we are using GNU C, under whatever name.
  530. cat > conftest.c <<EOF
  531. #ifdef __GNUC__
  532.   yes
  533. #endif
  534. EOF
  535. ${CC-cc} -E conftest.c > conftest.out 2>&1
  536. if egrep yes conftest.out >/dev/null 2>&1; then
  537.   GCC=1 # For later tests.
  538. fi
  539. rm -f conftest*
  540.  
  541. test -n "$silent" || echo "checking how to run the C preprocessor"
  542. if test -z "$CPP"; then
  543.   # This must be in double quotes, not single quotes, because CPP may get
  544.   # substituted into the Makefile and ``${CC-cc}'' will simply confuse
  545.   # make.  It must be expanded now.
  546.   CPP="${CC-cc} -E"
  547.   cat > conftest.${ac_ext} <<EOF
  548. #include "confdefs.h"
  549. #include <stdio.h>
  550. Syntax Error
  551. EOF
  552. # Some shells (Coherent) do redirections in the wrong order, so need
  553. # the parens.
  554. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  555. if test -z "$ac_err"; then
  556.   :
  557. else
  558.   rm -rf conftest*
  559.   CPP="${CC-cc} -E -traditional-cpp"
  560.   cat > conftest.${ac_ext} <<EOF
  561. #include "confdefs.h"
  562. #include <stdio.h>
  563. Syntax Error
  564. EOF
  565. # Some shells (Coherent) do redirections in the wrong order, so need
  566. # the parens.
  567. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  568. if test -z "$ac_err"; then
  569.   :
  570. else
  571.   rm -rf conftest*
  572.   CPP=/lib/cpp
  573. fi
  574. rm -f conftest*
  575. fi
  576. rm -f conftest*
  577. fi
  578. test -n "$verbose" && echo "    setting CPP to $CPP"
  579.  
  580.  
  581. echo checking for signed size_t type
  582. echo '#include <stddef.h>
  583. FOOBAR __SIZE_TYPE__ FOOBAR' > conftest.c
  584. eval "$CPP conftest.c 2>/dev/null" \
  585. | grep '^FOOBAR.*unsigned.*FOOBAR$' >/dev/null \
  586. || {
  587.     DEFS="$DEFS -U__SIZE_TYPE__ -D__SIZE_TYPE__=unsigned"
  588.   (echo '#undef __SIZE_TYPE__';
  589.    echo '#define __SIZE_TYPE__ unsigned') >> confdefs.h
  590.   test -n "$verbose" && echo '    using unsigned int for size_t'
  591. }
  592. rm -f conftest*
  593.  
  594. test -n "$silent" || echo "checking for libc-friendly stddef.h"
  595. cat > conftest.${ac_ext} <<EOF
  596. #include "confdefs.h"
  597. #define __need_size_t
  598. #define __need_wchar_t
  599. #include <stddef.h>
  600. #define __need_NULL
  601. #include <stddef.h>
  602. int main() { return 0; }
  603. int t() { size_t size; wchar_t wchar;
  604. #ifdef offsetof
  605. #error stddef.h ignored __need_*
  606. #endif
  607. if (&size == NULL || &wchar == NULL) abort ();; return 0; }
  608. EOF
  609. if eval $ac_compile; then
  610.   rm -rf conftest*
  611.   config_vars="$config_vars
  612. stddef.h = # The installed <stddef.h> seems to be libc-friendly."
  613. test -n "$verbose" && echo '    installed stddef.h looks friendly'
  614.  
  615. fi
  616. rm -f conftest*
  617.  
  618.  
  619.  
  620. echo 'checking for need to use -P to assemble .S files'
  621. cat > conftest.S <<EOF
  622. #include "confdefs.h"
  623. /* Nothing whatsoever.  */
  624. EOF
  625. ${CC-cc} $CFLAGS -c conftest.S 2>/dev/null || {
  626.   config_vars="$config_vars
  627. asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
  628.   test -n "$verbose" && echo '    using -P flag'
  629. }
  630. rm -f conftest*
  631.  
  632. # Iterate over all the sysdep directories we will use, running their
  633. # configure fragments, and looking for a uname implementation.
  634. uname=
  635. for dir in $sysnames; do
  636.   if test -r $sysdep_dir/$dir/configure; then
  637.     echo running configure fragment for $dir
  638.     . $sysdep_dir/$dir/configure
  639.   fi
  640.   test ! "$uname" && \
  641.   test -r $sysdep_dir/$dir/uname.c -o -r $sysdep_dir/$dir/uname.S && uname=$dir
  642. done
  643.  
  644. # If we will use the generic uname implementation, we must figure out what
  645. # it will say by examining the system, and write the results in config-name.h.
  646. if [ "$uname" = generic ]; then
  647.  
  648.   echo trying to guess OS release and version for uname
  649.  
  650.   kernel_release=
  651.   kernel_version=
  652.  
  653.   if [ ! "$release" -o ! "$version" ]; then
  654.     if [ -r /vmunix ]; then
  655.       kernel_id=`strings /vmunix | grep UNIX`
  656.     elif [ -r /dynix ]; then
  657.       kernel_id=`strings /dynix | grep DYNIX`
  658.     else
  659.       kernel_id=
  660.     fi
  661.     if [ "$kernel_id" ]; then
  662.       kernel_release=`echo "$kernel_id" | sed 's/^[^0-9.]*\([0-9.]*\).*$/\1/'`
  663.       kernel_version=`echo "$kernel_id" | sed 's/^[^#]*#\([0-9]*\).*$/\1/'`
  664.     fi
  665.   fi
  666.  
  667.   sysname=`echo $os | sed 's/[0-9.]*$//'`
  668.   if [ $sysname != $os ]; then
  669.     config_release=`echo $os | sed s/$sysname//`
  670.   fi
  671.  
  672.   if [ "$release" ]; then
  673.     # All is well.
  674.     true
  675.   elif [ x`echo "$config_release" | sed "s/^$kernel_release//"` \
  676.      != x$config_release ]; then
  677.     # The configuration release is a substring of the kernel release.
  678.     release=$kernel_release
  679.   elif [ x$config_release != x ]; then
  680.     release=$config_release
  681.   elif [ x$kernel_release != x ]; then
  682.     release=$kernel_release
  683.   else
  684.     cat <<END
  685. I don't know what release of $sysname you are using.  Please enter the
  686. release number now.  This information is used only for the \`uname' function,
  687. so it is not critical.
  688. END
  689.     read release
  690.     if [ ! "$release" ]; then
  691.       release=unknown
  692.     fi
  693.   fi
  694.  
  695.   if [ "$version" ]; then
  696.     # All is well.
  697.     true
  698.   elif [ ! "$kernel_version" ]; then
  699.     cat <<END
  700. I don't know what version of $sysname $release you are using.  Please enter
  701. the version number now.  This information is used only for the uname
  702. function, so it is not critical.
  703. END
  704.     read version
  705.     if [ ! "$version" ]; then
  706.       version=unknown
  707.     fi
  708.   else
  709.     version=$kernel_version
  710.   fi
  711.  
  712.   cat > config-name.h <<END
  713. /* This file was generated automatically by configure.  Do not edit.
  714.    This is used by the generic uname function.  */
  715. #define UNAME_SYSNAME "${sysname}"
  716. #define UNAME_RELEASE "${release}"
  717. #define UNAME_VERSION "${version}"
  718. #define UNAME_MACHINE "${config_machine}-${config_vendor}"
  719. END
  720.  
  721.   system_name="$sysname $release version $version on $vendor $machine"
  722. else
  723.   # Not generic uname.  We don't need config-name.h at all.
  724.   system_name=$config
  725. fi
  726.  
  727. if [ "$gnu_ld" ]; then
  728.   DEFS="$DEFS -DHAVE_GNU_LD"
  729. fi
  730. if [ "$gnu_as" ]; then
  731.   DEFS="$DEFS -DHAVE_GNU_AS"
  732. fi
  733.  
  734. (
  735.   echo '# This file was generated automatically by configure.  Do not edit.'
  736.   echo '# Put configuration parameters in configparms instead.'
  737.   echo "config-machine = ${config_machine}"
  738.   echo "config-vendor = ${config_vendor}"
  739.   echo "config-os = ${config_os}"
  740.   echo "config-sysdirs = ${sysnames}"
  741.   if [ "$prefix" ]; then
  742.     echo "prefix = ${prefix}"
  743.   fi
  744.   if [ "$exec_prefix" ]; then
  745.     echo "exec_prefix = ${exec_prefix}"
  746.   fi
  747.   echo "config-defines = ${DEFS}"
  748.   for var in INSTALL INSTALL_PROGRAM INSTALL_DATA RANLIB; do
  749.     eval "echo \"${var} = \${$var}\""
  750.   done
  751.   echo "$config_vars"
  752. ) > config.make
  753. echo "Wrote config.make in $PWD."
  754.  
  755. if [ $srcdir != . ]; then
  756.   if [ $srcdir = .. ]; then
  757.     cwd=`pwd`
  758.     objdir=`basename $cwd`
  759.   else
  760.     objdir=`pwd`
  761.   fi
  762.   cat > Makefile <<END
  763. # This file was generated automatically by configure.  Do not edit.
  764. srcdir = $srcdir
  765.  
  766. all .DEFAULT:
  767.     \$(MAKE) -C \$(srcdir) objdir=\`pwd\` \$@
  768. END
  769.  
  770. echo "Wrote Makefile in $PWD."
  771. fi
  772.  
  773. cat > config.status <<END
  774. #!/bin/sh
  775. # This file was generated automatically by configure.  Do not edit.
  776. # The GNU C library was configured in $PWD for
  777. # $system_name as follows:
  778. release=$release version=$version $0 $configure_args \$*
  779. END
  780. chmod a+x config.status
  781. echo "Wrote config.status in $PWD."
  782.  
  783. exit 0
  784. s%@INSTALL@%$INSTALL%g
  785. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  786. s%@INSTALL_DATA@%$INSTALL_DATA%g
  787. s%@RANLIB@%$RANLIB%g
  788. s%@CC@%$CC%g
  789. s%@CPP@%$CPP%g
  790. INSTALL='$INSTALL'
  791. INSTALL_PROGRAM='$INSTALL_PROGRAM'
  792. INSTALL_DATA='$INSTALL_DATA'
  793. RANLIB='$RANLIB'
  794. CC='$CC'
  795. CPP='$CPP'
  796.